﻿// -----------------------------------------------------------------------
// <copyright file="RepositorySection.cs" company="EPAM Systems">
////Copyright (c) EPAM Systems. All rights reserved.
// </copyright>
// -----------------------------------------------------------------------

namespace Epam.PhotoGallery.Bussines.Configuration
{
	using System.Configuration;

	/// <summary>
	/// RepositorySection : ConfigurationSection
	/// </summary>
	public class RepositorySection : ConfigurationSection
	{
		#region Constants

		/// <summary>
		/// string RepositorySectionName
		/// </summary>
		public const string RepositorySectionName = "RepositoryGroup/Repository";

		#endregion

		/// <summary>
		/// Gets or sets the path.
		/// </summary>
		/// <value>
		/// The path of repository.
		/// </value>
		[ConfigurationProperty("path", DefaultValue = "Albums", IsRequired = false)]
		public string Path
		{
			get
			{
				return (string)this["path"];
			}
			set
			{
				this["path"] = value;
			}
		}

		/// <summary>
		/// Gets or sets the is relative.
		/// </summary>
		/// <value>
		/// The is relative.
		/// </value>
		[ConfigurationProperty("relative", DefaultValue = "false", IsRequired = false)]
		public bool IsRelative
		{
			get
			{
				return (bool)this["relative"];
			}
			set
			{
				this["relative"] = value;
			}
		}
	}
}
